{% extends 'demo/base.html' %}
{% load common_extras %}
{% block title %}
    {{ now_cls|capfirst }}博客-专业IT技术发表平台
{% endblock %}
{% block header %}
    {% include 'demo/header.html' %}
{% endblock %}
{% block main %}
    {% include 'demo/classes.html' %}
    {% if articles %}
        <ul class="nav">
        {% for article in articles %}
            <li>
                <a href="/demo/article/{{ article.id }}">
                    <div class="left">
                        <h4>{{ forloop.counter }}、{{ article.title }}</h4>
                        <p>{{ article.desc }}</p>
                        <p class="time-info">发布时间：{{ article.create_time|time_since }}</p>
                    </div>
                    <div class="right">
                        <img src="/static/media/{{ article.cover }}/" alt="">
                    </div>
                </a>
            </li>
            {% if forloop.last %}
                <div class="bottom-info">已经是最后一篇文章了~已经到底了~</div>

            {% endif %}


        {% endfor %}
    {% else %}
        <div class="bottom-info">暂无该分类文章</div>
    {% endif %}
</ul>

{% endblock %}
